//
//  Player.m
//  B段项目
//
//  Created by 昶博 on 15/9/24.
//  Copyright (c) 2015年 昶博. All rights reserved.
//

#import "Player.h"

@implementation Player

+(Player *)share
{
    static Player *play = nil;
    if (play == nil) {
        play = [[Player alloc]init];
    }
    return play;
}
-(void)playWithUrl:(NSURL *)url
{
    [self stop];
    self.player = [[STKAudioPlayer alloc] init];
    [self.player playURL:url];
}
-(void)stop
{
    if (self.player) {
        [self.player stop];
    }
}
-(void)pause //暂停
{
    [self.player pause];
}
-(void)resume //播放
{
    [self.player resume];
}

@end
